package tag26_14_08.klasse_file;

import java.io.File;

public class Kf02_Methoden {

	public static void main(String[] args) {

		print(new File("C:\\Windows"));
		
		print(new File("../Grundlagen"));
		
		print( new File(".") );
		
		File f1 = new File("bin");
		print(f1);
		
		File fA2 = f1.getAbsoluteFile();
		print(fA2);

		print( new File("G:\\nichtda"));
		
		
		
		
		
		
	}
	
	static void print(File file){
		System.out.println("-----------------------------------");
		System.out.println("Pfad: " + file);
		System.out.println( "exists: " + file.exists() );
		
		String str = file.getAbsolutePath();
		System.out.println("getAbsolutePath : " + str);
		
		str = file.getName();
		System.out.println("getName : " + str);
		
		File parent = file.getParentFile(); 
		System.out.println("getParentFile : " + parent);
		
		boolean erg = file.isDirectory();
		System.out.println("isDirectory : "+erg);
		
		erg = file.isFile();
		System.out.println("isFile : "+erg);
		
		
		
		
	}

}
